#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
/*int main() {
	int a = 10;
	int b = 20;
	printf("%d", a ^ b);
}*/
#include <stdio.h>
/*int main()
{
	int num1 = 1;
	int num2 = 2;
	int a=num1& num2;
	int b=num1 | num2;
	int c=num1^ num2;
	printf("%d %d %d", a, b, c);
	return 0;
}*/
#include <stdio.h>
/*int main()
{
	int a = 10;
	int b = 20;
	a = a ^ b;
	b = a ^ b;
	a = a ^ b;
	printf("a = %d b = %d\n", a, b);
	return 0;
(}*/
/*int NumberOf1(int x) {
	int count_t = 0;
	int i = 0;
	for (i = 0; i < 32; i++) {
		if ((x >> i) & 1 == 1)
			count_t++;
	}
	return count_t;
}
int main() {
	int x = 0;
	int k = 0;
	scanf("%d", &k);
	x = NumberOf1(k);
	printf("%d", x);
}*/
/*void Printbit(int x) {
	int i = 0;
	for (i = 31; i >=1 ; i-=2) {
		int b = (x >> i) & 1;
		printf("%d", b);
		}
	printf("\n");
	for (i = 30; i >= 0; i -=2) {
		int a = (x >> i) & 1;
		printf("%d", a);
	}
	printf("\n");
}

int main() {
	
	int k = 0;
	scanf("%d", &k);
	Printbit(k);
}*/
int calc_diff_bit(int x, int y) {
	int i = 0;
	int count_t = 0;
	for (i = 0; i < 32; i++) {
		if (((x >> i) & 1 )!= ((y >> i) & 1))
			count_t++;
	}
	return count_t;
}
int main() {
	int a = 0;
	int b = 0;
	scanf("%d %d", &a, &b);
	int count=calc_diff_bit(a, b);
	printf("%d", count);


}